package pdn.sci.cs.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import pdn.sci.cs.dao.ChildSponsorDao;
import pdn.sci.cs.entity.ChildSponsor;

@Service
public class ChildSponsorService {

	@Autowired private ChildSponsorDao childSponsorDao;

	public List<ChildSponsor> findAll() {
		return childSponsorDao.findAll();
	}

	public ChildSponsor findById(String id) {
		return childSponsorDao.findById(id);
	}

	public ChildSponsor save(ChildSponsor d) {
		return childSponsorDao.save(d);
	}

	public void update(ChildSponsor d) {
		childSponsorDao.update(d);
	}

	public void delete(String id) {
		childSponsorDao.deleteById(id);
	}

	public void delete(ChildSponsor sponsor) {
		childSponsorDao.delete(sponsor);
	}

	public List<ChildSponsor>  findByChildId(String childId) {
		return childSponsorDao.findByChildId(childId);
	}

	public List<ChildSponsor>  findBySponsorId(String sponsorId) {
		return childSponsorDao.findBySponsorId(sponsorId);
	}

}
